package net.sureon.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

public class ReminderDAOImpl extends SqlMapClientDaoSupport implements
    ReminderDAO {
	private static final String KEY_COMPANYID = "companyID";
	private static final String KEY_INTERVAL = "reminderInterval";
    public List<DailyTimingReminder> getdailyTimingReminderList(long companyID, int reminderInterval) {
        Map map = new HashMap();
        map.put(KEY_INTERVAL, reminderInterval);
        map.put(KEY_COMPANYID, companyID);
    	return getSqlMapClientTemplate().queryForList("dailyTimingReminder",
            map);
    }
    public List<ToBeApproveReminder> getToBeRemindedApplications(long companyID, int reminderInterval) {
        Map map = new HashMap();
        map.put(KEY_INTERVAL, reminderInterval);
        map.put(KEY_COMPANYID, companyID);
    	return getSqlMapClientTemplate().queryForList("getToBeRemindedApplications",
            map);
    }    
    public List<ToBeApproveReminder> getToBeRemindedDailyTimingApproval(long companyID, int reminderInterval) {
        Map map = new HashMap();
        map.put(KEY_INTERVAL, reminderInterval);
        map.put(KEY_COMPANYID, companyID);
    	return getSqlMapClientTemplate().queryForList("getToBeRemindedDailyTimingApproval",
            map);
    }  
}